package com.hospital.common.dto.payment.module;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hospital.common.validator.payment.module.ValidateGroup;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class OrderDto {
    /**
     * 患者ID
     */
    @NotNull(message = "患者ID不能为空",groups = {ValidateGroup.OrderQueryGroup.InPage.class,
        ValidateGroup.OrderQueryGroup.NotForStat.class})
    private Long patientId;
    /**
     * 订单类型
     */
    private Integer orderType;
    /**
     * 订单状态
     */
    private Integer orderStatus;
    /**
     *  页数
     */
    @NotNull(message = "页数不能为空",groups = ValidateGroup.OrderQueryGroup.InPage.class)
    private Integer pageNum;
    /**
     * 每页数量
     */
    @NotNull(message = "每页数量不能为空",groups = ValidateGroup.OrderQueryGroup.InPage.class)
    private Integer pageSize;
    /**
     * 开始时间
     */
    @NotNull(message = "开始时间不能为空",groups = ValidateGroup.OrderQueryGroup.ForStat.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;
    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "结束时间不能为空",groups = ValidateGroup.OrderQueryGroup.ForStat.class)
    private LocalDateTime endTime;
}
